<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/18
 * Time: 12:23
 */

?>
<style>
    .box {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        background: white;
        margin-top: 10px;
    }

    .box-item {
        width: 50%;
        padding: 10px;
        position: relative;
    }

    .box-item .player {
        background-color: white;
    }

    .vote {
        top: 10%;
        left: -4px;
        color: white;
        font-size: 12px;
        padding: 0 6px;
        position: absolute;
    }

    .box .box-item:nth-child(2n) {
        padding-right: 0;
    }

    .box .box-item:nth-child(2n+1) {
        padding-left: 0;
    }

    .btn-r10 {
        border-radius: 15px;
    }

    .player_name {
        font-weight: bold;
        font-size: 14px;
    }

    .player_picture {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 6px;
    }
</style>

<?php

echo \yii\widgets\ListView::widget([
    'dataProvider' => $dataProvider,
    'options' => ['class' => 'box r4_card'],
    // 'layout' => "{items}\n{pager}",
    'itemOptions' => ['class' => 'box-item'],
    'itemView' => '_player_item',
    'summary' => '',
    'pager' => [
        'class' => \common\widgets\Y2sp\ScrollPager::className(),
        'triggerTemplate' => '<div class="ias-spinner btn btn-block" style="text-align: center;"><img class="down" src="/images/common/down.png"/></div>',
        'noneLeftText' => '',
    ]
]);
?>